From 960889ec74b12332acd45eda29c0845cec34b762 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Thu, 5 Feb 2009 23:41:00 +0000 Subject: [PATCH] Make parserTests.php more git bisect-friendly Now the following commands can track down parser test regressions (if you're using git svn, of course): git bisect start bad-rev good-rev git bisect run maintenance/parserTests.php --regex 'Test name' Just type those in (replacing "bad-rev" and "good-rev" with revision ids, and 'Test name' with a regex that uniquely matches the regressing test's name), and git will magically find the first bad revision for you in a couple of minutes. (Then run git bisect reset to get back to normal.) All I changed to make this possible was changing the error return code from 255 (-1) to 1. git bisect treats 1-124 and 126-127 as error codes, but for some reason doesn't like 128-255. --- maintenance/parserTests.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maintenance/parserTests.php b/maintenance/parserTests.php index 0d50feb1ac..9a1a4807c7 100644 --- a/maintenance/parserTests.php +++ b/maintenance/parserTests.php @@ -71,5 +71,5 @@ if ( isset( $options['fuzz'] ) ) { $tester->fuzzTest( $files ); } else { $ok = $tester->runTestsFromFiles( $files ); - exit ($ok ? 0 : -1); + exit ($ok ? 0 : 1); } -- 2.20.1